﻿#ifndef REQUESTLIST_H
#define REQUESTLIST_H

#include <QtGui>
#include <QtSql>
#include "mydatamodel.h"


namespace Ui {
class requestList;
}

class requestList : public QFrame
{
    Q_OBJECT
    
public:
    explicit requestList(QWidget *parent = 0);
    ~requestList();

public slots:
    void updateList();

private:
    void fillStuff();
    QString getQuery();
    myDataModel *dbModel;
    bool showAll;





    Ui::requestList *ui;
    enum{
        RDB_enumber,
        RDB_indate,
        RDB_client,
        RDB_problem,
        RDB_result,
        RDB_outdate,
        RDB_comment,
        RDB_who,
        RDB_attention

    };
private slots:
    void	rcurrentRowChanged ( const QModelIndex & current, const QModelIndex & previous );

    void on_showallButton_clicked();
    void on_searchButton_clicked();
    void on_delsearchButton_clicked();
    void on_doneButton_clicked();
    void on_addButton_clicked();
    void on_changeButton_clicked();
    void on_searchEdit_returnPressed();
};

#endif // REQUESTLIST_H
